package com.snowfeel.sfmall.api.leaf.feign;

import com.snowfeel.sfmall.core.response.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author guomenghuai
 * @date 2024/8/24
 * @Description
 */
@FeignClient(name = "sfmall-cloud-leaf")
public interface SegmentFeignClient {

    @RequestMapping(value = "/api/segment/get/{key}")
    JsonResult<Long> getSegmentId(@PathVariable("key") String key);

    @RequestMapping(value = "/api/segment/getlist/{key}")
    List<String> getSegmentIdList(@PathVariable("key") String key,
                                  @RequestParam("keyNumber") int keyNumber);
}
